import intl from 'react-intl-universal'

const locales = {
  en: require('@/locales/en-US.json'),
  zh: require('@/locales/zh-CN.json'),
}
intl.init({
  currentLocale: window.sessionStorage.getItem('defaultLocal') || 'zh',
  locales,
})
const SelectConfig = [
  { label: '中文', value: 'zh' },
  { label: 'English', value: 'en' },
]

export { locales, SelectConfig }
export default intl
